from models.base import BaseModel, db


class SystemLog(BaseModel):
    __tablename__ = 'system_log'
    __table_args__ = {'comment': 'CMS系统日志表'}

    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
    module = db.Column(db.String(255), nullable=False, comment='操作模块')
    operation_detail = db.Column(db.JSON, nullable=False, comment='操作内容')
    operator = db.Column(db.BigInteger, nullable=False, comment='操作人')
